home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / shells / sh03src.zoo / sh-pl03 / sh / README.ST < prev    next >
Encoding:
Text File  |  1993-05-24  |  8.0 KB  |  205 lines

  1. BSD Bourne Shell for MiNT
  2. ported by Michael Hohmuth <hohmuth@freia.inf.tu-dresden.de>
  3.  
  4. Distribution PL 03
  5. 21 May 1993
  6.  
  7. The description of the MiNT port follows after the original copyright notice:
  8.  
  9. -------------------------------------------------------------------------------
  10.  
  11.  Copyright (c) 1991 The Regents of the University of California.
  12.  All rights reserved.
  13.  
  14.  This code is derived from software contributed to Berkeley by
  15.  Kenneth Almquist.
  16.  
  17.  Redistribution and use in source and binary forms, with or without
  18.  modification, are permitted provided that the following conditions
  19.  are met:
  20.  1. Redistributions of source code must retain the above copyright
  21.     notice, this list of conditions and the following disclaimer.
  22.  2. Redistributions in binary form must reproduce the above copyright
  23.     notice, this list of conditions and the following disclaimer in the
  24.     documentation and/or other materials provided with the distribution.
  25.  3. All advertising materials mentioning features or use of this software
  26.     must display the following acknowledgement:
  27.     This product includes software developed by the University of
  28.     California, Berkeley and its contributors.
  29.  4. Neither the name of the University nor the names of its contributors
  30.     may be used to endorse or promote products derived from this software
  31.     without specific prior written permission.
  32.  
  33.  THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  34.  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  35.  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  36.  ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  37.  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  38.  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  39.  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  40.  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  41.  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  42.  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  43.  SUCH DAMAGE.
  44.  
  45. -------------------------------------------------------------------------------
  46.  
  47. This is my (Michael Hohmuth's) port of Kenneth Almquist's BSD Bourne Shell sh 
  48. (from the 2nd BSD Networking Distribution) (also known as "ash") to MiNT 
  49. (_not_ TOS).
  50.  
  51. This file only describes the special features of the MiNT version.  For 
  52. documentation refer to the manual pages.
  53.  
  54. Manifest:
  55.  
  56.     ARGV.TXT    - a proposal for an ARGV standard extension that
  57.               adds support for empty parameters
  58.     README.ST       - this file
  59.     funcs/*         - a set of useful functions for sh
  60.     sh              - sh binary for MiNT (rename it to sh.ttp if you want)
  61.     sh.1            - sh manual
  62.     sh.man          - sh manual in roff format
  63.  
  64.     The source distribution additionally contains:
  65.  
  66.     TOUR            - description of sh source
  67.     sh03diffs       - source diffs relative to 2nd BSD Networking Distr.
  68.     all other files - sh source
  69.  
  70. Special features of the MiNT version:
  71.  
  72.     o   The version of `sh' in this distribution is MiNT-friendly in the
  73.         following aspects:
  74.  
  75.         (1) sh uses the DOS filesystem compatible file name 
  76.             "profile.sh" instead of ".profile".
  77.  
  78.         (2) sh strips CR's ('\r') from its input.
  79.  
  80.     o   This version of `sh' has been configured to support a virtual
  81.         directory "/u" which contains the home directories of all
  82.         users as subdirectories ("/u/heinz" is equivalent to user heinz's
  83.         home directory).
  84.         
  85.     o   The MiNT version of `sh' supports the following suffixes which 
  86.         executable files can have: ".tpp", ".tos", ".prg".
  87.  
  88.     o   The MiNT version of `sh' will behave like a login shell if it
  89.         has been started from the desktop (i.e. without ARGV) and with
  90.         no arguments.
  91.  
  92.     o   `sh' has been linked with the MiNT Library PatchLevel 
  93.         pre-31.  That means that it has the following additional 
  94.         feature:
  95.  
  96.         All environment variables which are listed in the environment 
  97.         variable "PCONVERT" will be converted from a DOS style path 
  98.         list to a Unix style one.  If "PCONVERT" does not exist, it 
  99.         defaults to "PATH".  Please note that setting PCONVERT from
  100.         inside sh has no effect on the other environment variables
  101.         (except when spawning, when the variables will be converted
  102.         back to TOS style).  So make sure that PCONVERT has been
  103.         initialized before you enter sh (e.g. set in in your mint.cnf 
  104.         file).
  105.  
  106.         I suggest you use at least the following setup for "PCONVERT": 
  107.         "PATH,HOME,SHELL,CDPATH".
  108.  
  109.     o   Support for empty (i.e., zero length) command line parameters
  110.         has been included, according to a proposed extension to Atari's
  111.         ARGV standard (see ARGV.TXT for details).  That means that
  112.         `sh' can accept and pass empty parameters given that the
  113.         calling/called program also supports the ARGV standard 
  114.         extension.  (Hopyfully, one of the next mntlib PatchLevels will
  115.         contain support for this.)
  116.  
  117.     o   `sh' has been compiled with GCC 2.3.3 pl 2 and the
  118.         "-mbaserel" option so that it is sharable under MiNT.
  119.  
  120. What I have _not_ done:
  121.  
  122.     I haven't made attempts to let `sh' understand TOS style file names
  123.     (such as "a:\bla\foo") as I generally don't use it interactively 
  124.     but mostly as a script interpreter.
  125.  
  126.     `sh' doesn't import a list of suffixes from the SUFFIXES environment
  127.     variable yet, the list of executable suffixes it knows of is hard-
  128.     coded.
  129.  
  130.     I haven't touched the scripts in the funcs/ subdirectory.  Depending
  131.     on your setup, they'll probably require some changes -- see below.
  132.  
  133. Random notes:
  134.  
  135.     You need good versions of `pwd' and `test' (which are not built
  136.     into `sh') for maximal utility.  I have included a simple `pwd'
  137.     programs in this distribution; a version of `test' comes with
  138.     the GNU shell utilities (I have not included Stephan's version
  139.     of `test' (from his original distribution) in this distribution 
  140.     as it seems to have a limited functionality).
  141.  
  142.     Don't forget to create a symbolic link `[' -> `test' (or, on TOS
  143.     file systems, copy `test.ttp' to `[.ttp').  Many shell scripts
  144.     rely on this.
  145.  
  146.     Keep in mind that most MiNT utilities don't yet support empty
  147.     parameters (the ARGV standard extension providing support for this
  148.     is still very new, and not yet well-established).  That's
  149.     why things like 
  150.         if [ "$bla" = "" ]
  151.     won't work as you would expect them to if `/bin/[' (resp. 
  152.     `/bin/test') doesn't support the ARGV standard extension.
  153.     Use something like
  154.         if [ "$bla " = " " ]
  155.     instead.
  156.     Some of the scripts in the funcs/ subdir also rely on empty
  157.     parameters and will require some changes if your setup doesn't
  158.     support the new ARGV scheme.
  159.  
  160. Credits:
  161.  
  162.     Ash has been written by Kenneth Almquist.  Several bug fixes and 
  163.     enhancements by Jim Wilson <wilson@moria.cygnus.com> and 
  164.     J.T. Conklin <conklin@talisman.kaleida.com> have been applied;
  165.     these have been part of the 386BSD port of ash.
  166.  
  167.     The original port of ash to MiNT was done by Stephan Neuhaus
  168.     <neuhaus@informatik.uni-kl.de>.  Stephen R. Usher 
  169.     <susher@earth.ox.ac.uk> made some fixes.
  170.  
  171.     I actually made it work correctly by applying the nessecary changes
  172.     to the MiNT library, and improved compatibelity with MiNT.
  173.  
  174. Enjoy!
  175.  
  176. Michael Hohmuth
  177.  
  178. hohmuth@freia.inf.tu-dresden.de
  179. mh1@irz.inf.tu-dresden.de
  180.  
  181.  
  182. --------------------------------------------------------------------------
  183.  
  184. APPENDIX
  185.  
  186. If you want to re-compile sh for MiNT:
  187.  
  188.     Get the source distribution of my port, if you do not already
  189.     have it.
  190.  
  191.     The source distribution also contains diffs relative to the 2nd
  192.     BSD Networking distribution.  These can be useful if you plan to
  193.     hack a newer version of `sh'.
  194.  
  195.     You should have a non-TOS file system to build `sh'.  Also,
  196.     you need a `sh' binary for the source generator scripts,
  197.     and good versions of fileutilities, `grep', `awk', `sed' (well,
  198.     the source distribution does contain the files that are generated
  199.     with the help of these programs, so you probably do not actually 
  200.     need them) and GNU Make.
  201.  
  202.     Edit the "Makefile" to suit your taste.  Delete the definition
  203.     of the symbol "DOSFS" if you prefer to read ".profile" instead
  204.     of "profile.sh".
  205.